package com.chw.controller;

import com.chw.common.ChwTS;
import com.chw.service.OrgService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("org")
public class OrgContreller {
    @Resource
    private OrgService orgService;
    //根据是白名单的数据
    @RequestMapping("queryOrgByisDel")
    public ChwTS queryOrgByisDel(){
        try{
            return ChwTS.success(orgService.queryOrgByisDel());
        }catch (Exception e){
           return ChwTS.error(500,e.getMessage());
        }
    }
    //查询全部
    @RequestMapping("queryOrg")
    public ChwTS queryOrg(){
        try{
            return ChwTS.success(orgService.queryOrg());
        }catch (Exception e){
           return ChwTS.error(500,e.getMessage());
        }
    }
}
